package com.example.capsule_chat0322.bean;

import androidx.annotation.Nullable;

/**
 * @Author zhuzhiming
 * @Date 2022/4/30 19:22
 */
public class Msg {
    /**
     * 定义消息的实体类
     */
    //这是type类型的值
    public static final int TYPE_RECEIVE = 0;//表示收到的一条信息
    public static final int TYPE_SEND = 1;//表示发出的一条信息
    public static final int TYPE_REMIND = 2;//表示收到一条提示信息

    public static final int WORD_TYPE = 0;
    public static final int Other_FILE_TYPE = 1;
    public static final int RECALL_TYPE = 2;

    private int id;
    //content表示消息的内容，type表示消息的类型
    private String content;
    private String senderId;
    private int type;
    private boolean isOneToOne;
    private int fileType = 0;
    private String roomName;
    private String fileDesc;
    private String avatarPath;
    private String imageUrl;

    public Msg(String senderId, String roomName, int fileType, String content, int type, String avatarPath,boolean isOneToOne) {
        this.senderId = senderId;
        this.content = content;
        this.type = type;
        this.fileType = fileType;
        this.avatarPath = avatarPath;
        this.roomName = roomName;
        this.isOneToOne = isOneToOne;
    }

    public Msg(String senderId, int type, int fileType, String imageUrl, String roomName, String avatarPath, @Nullable String fileDesc,boolean isOneToOne) {
        this.senderId = senderId;
        this.type = type;
        this.fileType = fileType;
        this.imageUrl = imageUrl;
        this.roomName = roomName;
        this.avatarPath = avatarPath;
        this.fileDesc = fileDesc;
        this.isOneToOne = isOneToOne;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAvatarPath() {
        return avatarPath;
    }

    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }

    public String getContent() {
        return content;
    }

    public int getType() {
        return type;
    }

    public int getFileType() {
        return fileType;
    }

    public boolean isOneToOne() {
        return isOneToOne;
    }

    public void setOneToOne(boolean oneToOne) {
        isOneToOne = oneToOne;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getFileDesc() {
        return fileDesc;
    }

    public void setFileDesc(String fileDesc) {
        this.fileDesc = fileDesc;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setType(int type) {
        this.type = type;
    }
}
